Programming with QuickTime VR

| Previous | Chapter contents | Chapter top | Section top | Next |

QTVRSetConstraints

You can use the QTVRSetConstraints function to set the constraints of a movie.

OSErr QTVRSetConstraints (
                     QTVRInstanceqtvr,
                     UInt16kind,
                     floatminValue,
                     floatmaxValue);
qtvr
An instance of a QuickTime VR movie.
kind
The type of constraint to set. See "Constraint Types" for a description of the available types of constraints.
minValue
A floating-point value that contains the desired minimum constraint of the specified type.
maxValue
A floating-point value that contains the desired maximum constraint of the specified type.
function result
A result code.

DESCRIPTION

The QTVRSetConstraints function sets the minimum and maximum constraints of the type specified by the kind parameter to the values specified by the minValue and maxValue parameters. Note that when you want to specify a pan angle constraint, the minValue and maxValue parameters should be specified so that a clockwise sweep from minValue to maxValue selects the desired angular expanse. For example, to constrain panning in the 90-degree expanse that spreads out 45 degrees on each side of the pan angle 0 degrees, you should set the minValue parameter to 315 degrees and the maxValue parameter to 45 degrees. Similarly, to constrain panning in the remaining 270-degree expanse, you should set the minValue parameter to 45 degrees and the maxValue parameter to 315 degrees.

The values passed to QTVRSetConstraints are unaffected by the current control settings.

SEE ALSO

Use QTVRGetConstraints (link) to get a movie's minimum and maximum constraints.


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |